@echo off
chcp 65001 >nul
echo 检查打包文件大小...
echo.

REM 检查不同版本的打包文件大小
echo === 原始打包文件大小 ===
if exist ".\dist\sticklistmain.exe" (
    for %%I in (".\dist\sticklistmain.exe") do (
        echo sticklistmain.exe: %%~zI 字节 ^(%%~zI MB^)
    )
) else (
    echo 未找到原始打包文件
)

echo.
echo === 优化打包文件大小 ===
if exist ".\dist\sticklistmain_optimized.exe" (
    for %%I in (".\dist\sticklistmain_optimized.exe") do (
        echo sticklistmain_optimized.exe: %%~zI 字节 ^(%%~zI MB^)
    )
) else (
    echo 未找到优化打包文件
)

echo.
echo === 高级优化打包文件大小 ===
if exist ".\dist\sticklistmain_advanced.exe" (
    for %%I in (".\dist\sticklistmain_advanced.exe") do (
        echo sticklistmain_advanced.exe: %%~zI 字节 ^(%%~zI MB^)
    )
) else (
    echo 未找到高级优化打包文件
)

echo.
echo === 文件大小对比 ===
if exist ".\dist\sticklistmain.exe" if exist ".\dist\sticklistmain_optimized.exe" (
    for %%I in (".\dist\sticklistmain.exe") do set "original=%%~zI"
    for %%I in (".\dist\sticklistmain_optimized.exe") do set "optimized=%%~zI"
    
    set /a "reduction=(%original%-%optimized%)*100/%original%"
    echo 优化减少了 %reduction%%% 的大小
)

echo.
pause